package cn.zhl.设计模式.命令;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2021-03-22 11:19
 **/
public class LightOnCommand implements Command{
	private LightObject object;

	public LightOnCommand(LightObject object){
		this.object = object;
	}

	@Override
	public void execute() {
		object.light();
	}

	@Override
	public void undo() {
		object.dark();
	}
}
